@import '@/assets/styles/normalize.css';
@import '@/assets/styles/nprogress.scss';
@import '@/assets/styles/theme.scss';

// 滚动条整体宽度
::-webkit-scrollbar {
  width: 5px;
}
// 滚动条滑槽样式
::-webkit-scrollbar-track {
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
  border-radius: 5px;
}
// 滚动条样式
::-webkit-scrollbar-thumb {
  border-radius: 5px;
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.3);
  background-color: var(--el-scrollbar-bg-color, var(--el-text-color-secondary));
}
::-webkit-scrollbar-thumb:hover {
  background: #ccc;
}
::-webkit-scrollbar-thumb:active {
  background: #999;
}
// 浏览器失焦的样式
::-webkit-scrollbar-thumb:window-inactive {
  background: inset 0 0 6px rgba(0, 0, 0, 0.3);
}

#app {
  .van-nav-bar__left, .van-nav-bar__right {
    padding: 0 var(--van-padding-xs);
  }
  img {
    -webkit-touch-callout:none; /*系统默认菜单被禁用*/
    -webkit-user-select:none; /*webkit浏览器*/
    -khtml-user-select:none; /*早期浏览器*/
    -moz-user-select:none;/*火狐*/
    -ms-user-select:none; /*IE10*/
    user-select:none;
    &[lazy=loading]{
      width: 100%;
      margin: 0 auto;
      text-align: center;
      display: inline-block;
      background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
      background-size: 200% 100%;
      animation: loading 1.2s ease-in-out infinite;
    }
    &[lazy=error]{
      width: 100%;
      margin: 0 auto;
      text-align: center;
      display: inline-block;
    }
  }
}

@keyframes loading {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: calc(200% + 100%) 0;
  }
}
